﻿CREATE TABLE [dbo].[Forms] (
    [FormID]     INT            IDENTITY (1, 1) NOT NULL,
    [FormName]   NVARCHAR (MAX) NULL,
    [WorkflowID] INT            DEFAULT ((0)) NOT NULL,
    CONSTRAINT [PK_dbo.Forms] PRIMARY KEY CLUSTERED ([FormID] ASC),
    CONSTRAINT [FK_dbo.Forms_dbo.Workflows_WorkflowID] FOREIGN KEY ([WorkflowID]) REFERENCES [dbo].[Workflows] ([WorkflowID])
);


GO
CREATE NONCLUSTERED INDEX [IX_WorkflowID]
    ON [dbo].[Forms]([WorkflowID] ASC);

